package com.lauroc.dept.service;

import com.lauroc.basic.utils.AjaxResult;
import com.lauroc.basic.utils.PageList;
import com.lauroc.dept.domain.Department;
import com.lauroc.dept.query.DepartmentQuery;

import java.util.List;

public interface IDepartmentService {

    /**
     * 查询一个
     */
    Department getById(Integer id);
    /**
     * 查询所有
     */
    AjaxResult getAll();
    /**
     * 查询与修改
     */
    void saveAndUpdate(Department department);
    /**
     * 删除
     */
    void delete(Long id);

    /**
     * 分页查询部门信息
     * @param department
     * @return
     */
    PageList<Department> findPage(DepartmentQuery department);

    //查询上级部门
    List<Department> findParentDepts();

    /**
     * 查询部门树   即所有的子集
     * @return
     */
    List<Department> treeDepts();

    /**
     * 批量删除
     * @param
     */
    void batchDelete(Long[] ids);
}
